//
//  ZZYTitleScrollView.h
//  ZZYHeaderView
//
//  Created by 张振宇 on 15/10/29.
//  Copyright © 2015年 张振宇. All rights reserved.
//

#import <UIKit/UIKit.h>

@protocol ZZYTitleScrollViewDelegate <NSObject>

/*
 *回调函数：告诉上层界面现在应该在的位置
 *Xpercent：这个数值乘以每个界面的width就是上层界面应该滑动的距离
 */
- (void)scrollviewShouldScollByTitleScollview:(float)Xpercent;

@end

@interface ZZYTitleScrollView : UIScrollView
/*
 *按钮的宽度，高度与scrollview相同
 */

@property (nonatomic, assign) CGFloat buttonWidth;
- (void)setupWithTitleArray:(NSArray *)array;

- (void)changeViewWithTag:(NSInteger)tag;

@property (assign, nonatomic) id<ZZYTitleScrollViewDelegate>titlesdelegate;
@end
